﻿<Window x:Class="ShellAnywhere.View.ShellAnywhereView"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
		xmlns:sap="clr-namespace:ShellAnywhere.Properties"
        xmlns:sav="clr-namespace:ShellAnywhere.View;assembly="
		Title="ShellAnywhereView"
        Name="_ShellAnywhereView"
		AllowsTransparency="True"
		Left="0"
		Top="0"
        Visibility="{Binding Mode=TwoWay, Path=WindowVisibility}"
		Width="{Binding Source={x:Static SystemParameters.WorkArea}, Path=Width}"
		SizeToContent="Height"
		WindowStyle="None"
		ResizeMode="NoResize"
		ShowInTaskbar="False" mc:Ignorable="d" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" d:DesignHeight="225">
    <StackPanel VerticalAlignment="Stretch" Height="Auto" Focusable="False">
        <ScrollViewer Visibility="{Binding Path=OutputVisibility}" Width="Auto" Height="300" HorizontalScrollBarVisibility="Disabled">
			<ListView Background="Black" ItemsSource="{Binding Output}" BorderThickness="0" Padding="0" Focusable="False">
				<ListView.View>
					<GridView>
						<GridView.ColumnHeaderContainerStyle>
							<Style TargetType="{x:Type GridViewColumnHeader}">
								<Setter Property="Visibility" Value="Collapsed"/>
								<Setter Property="HorizontalContentAlignment" Value="Stretch" />
								<Setter Property="VerticalContentAlignment" Value="Stretch" />
								<Setter Property="Width" Value="Auto" />
								<Setter Property="Focusable" Value="False"/>
							</Style>
						</GridView.ColumnHeaderContainerStyle>
						<GridView.Columns>
							<GridViewColumn>
								<GridViewColumn.CellTemplate>
									<DataTemplate>
										<Border>
											<TextBlock Foreground="CornflowerBlue" Text="{Binding Path=Time}"  Width="Auto" VerticalAlignment="Stretch"/>
										</Border>
									</DataTemplate>
								</GridViewColumn.CellTemplate>
							</GridViewColumn>
							<GridViewColumn>
								<GridViewColumn.CellTemplate>
									<DataTemplate>
										<TextBlock Foreground="CornflowerBlue" Text="{Binding Path=Entry}" Width="Auto" VerticalAlignment="Stretch">
											<TextBlock.Resources>
												<Style TargetType="{x:Type Paragraph}">
													<Setter Property="Margin" Value="0" />
												</Style>
											</TextBlock.Resources>
										</TextBlock>
									</DataTemplate>
								</GridViewColumn.CellTemplate>
							</GridViewColumn>								
						</GridView.Columns>
					</GridView>
				</ListView.View>
			</ListView>
		</ScrollViewer>
		<StackPanel VerticalAlignment="Stretch" Height="Auto" Focusable="False">
            <ListView Name="_ActionsListView" Background="CornflowerBlue" ItemsSource="{Binding Actions, NotifyOnTargetUpdated=True}" VirtualizingStackPanel.IsVirtualizing="False" sav:ListViewBehaviors.IsAutoUpdatingColumnWidths="True" BorderThickness="0" Padding="0" Focusable="False" >
				<ListView.View>
					<GridView>
						<GridView.ColumnHeaderContainerStyle>
							<Style TargetType="{x:Type GridViewColumnHeader}">
								<Setter Property="Visibility" Value="Collapsed"/>
								<Setter Property="HorizontalContentAlignment" Value="Stretch" />
								<Setter Property="VerticalContentAlignment" Value="Stretch" />
								<Setter Property="Width" Value="Auto" />
								<Setter Property="Focusable" Value="False"/>
							</Style>
						</GridView.ColumnHeaderContainerStyle>
						<GridView.Columns>
							<GridViewColumn>
								<GridViewColumn.CellTemplate>
									<DataTemplate>
                                        <Border BorderThickness="0,0,0,0" Margin="-6,0,-6,0" Padding="0,0,0,0" Width="Auto" VerticalAlignment="Stretch">
                                            <TextBlock FontSize="36" FontWeight="ExtraBold" Text="{Binding Path=Prompt}"/>
                                        </Border>
                                    </DataTemplate>
								</GridViewColumn.CellTemplate>
							</GridViewColumn>											
							<GridViewColumn>
								<GridViewColumn.CellTemplate>
									<DataTemplate>
										<Border BorderThickness="0,0,0,0" Margin="-6,0,-6,0" Padding="0,0,0,0" Width="Auto" VerticalAlignment="Stretch">
											<TextBlock FontSize="36" FontWeight="Bold" Text="{Binding Path=Matched}"/>
										</Border>
									</DataTemplate>
								</GridViewColumn.CellTemplate>
							</GridViewColumn>
							<GridViewColumn>
								<GridViewColumn.CellTemplate>
									<DataTemplate>
										<Border BorderThickness="0,0,0,0" Margin="-6,0,-6,0" Padding="0,0,0,0" Width="Auto" VerticalAlignment="Stretch">
											<TextBlock FontSize="36" FontStyle="Italic" Text="{Binding Path=Unmatched}"/>
										</Border>
									</DataTemplate>
								</GridViewColumn.CellTemplate>
							</GridViewColumn>
                            <GridViewColumn>
                                <GridViewColumn.CellTemplate>
                                    <DataTemplate>
                                        <Border BorderThickness="0,0,0,0" Margin="-6,0,-6,0" Padding="0,0,0,0" Width="Auto" VerticalAlignment="Stretch">
                                            <TextBlock FontSize="18" FontStyle="Italic" Text="{Binding Path=Description}"/>
                                        </Border>
                                    </DataTemplate>
                                </GridViewColumn.CellTemplate>
                            </GridViewColumn>
                        </GridView.Columns>
					</GridView>
				</ListView.View>
			</ListView>
		</StackPanel>
	</StackPanel>
</Window>

